<!doctype html>
<html lang="zh-cn">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Question</title>
  <!-- 1 引入外部的css样式文件  -->
  <link rel="stylesheet" href="./github.min.css">
  <!-- 2 高亮代码片段！！  -->
  <script src="./highlight.min.js"></script>
  <style>
    body {
      font-size: 14px;
      line-height: 1.6;
      margin: 0;
      padding: 16px;
    }

    img {
      max-width: 100%;
    }

    pre code {
      background-color: #f5f5f5 !important;
      border-radius: 8px;
    }
  </style>
</head>

<body>
  <div id="content">我是默认值</div>
  <script>
    function writeHtml(str) {
      const el = document.querySelector('#content');
      el.innerHTML = str;
      hljs.highlightAll(); // 让代码片段高亮 ！！ 
    }

    // writeHtml(你好)
  </script>
</body>

</html>